<?php 
class annonce_models_melanger extends CI_Model{
	public function __construct(){
		$this->load->database();
	}
	public function get_all_product($category_id){
		$query = $this->db->get_where('product', array('category_id' => $category_id));
		if($query->num_rows()){
			return $query->result();
		}
		return false;
	}
	public function update_date($prd_id,$date){
		$data=array('date_create'=>$date,'date_validate'=>$date);
		$this->db->update('product', $data, "prd_id = $prd_id");
	}
}